home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / os2 / ftree11a.zip / PERSONS.FTX < prev    next >
Text File  |  1996-10-30  |  7KB  |  212 lines

  1. /*
  2.    Family Tree Rexx Script FTX
  3.  
  4.    Copyright (C) 1996 by <Nils Meier, Peter Gervai>
  5.  
  6.    Please send comments to / Kommentar bitte an
  7.         meier2@athene.informatik.uni-bonn.de
  8.  
  9.    <
  10.    English:   This script shows all informations about the persons in the tree,
  11.               sorted by birth date.                                          :English
  12.    Deutsch:   Dieses Skript zeigt alle Informationen aller Personen im Baum,
  13.               sortiert nach Geburtsdatum.                                    :Deutsch
  14.    Nederlands:This script shows all informations about the persons in the tree,
  15.               sorted by birth date.                                          :Nederlands
  16.    Francais:  Ce script donne toutes les informations sur les personnes composant
  17.               l'arbre généalogique, classées par date de naissance.          :Francais
  18.    >
  19.  
  20.    Long name is <
  21.                  English:    List persons in the tree        :English
  22.                  Deutsch:    Auflisten der Personen im Baum  :Deutsch
  23.                  Nederlands: List persons in the tree        :Nederlands
  24.                  Francais:   Imprime le personnes composant  :Francais
  25.                 >
  26. */
  27.  
  28. /* ----------------------- Params  /  Parameter ------------------- */
  29.  
  30. CALL InitLanguage
  31.  
  32. /* Select first person in the tree */
  33. rc=sortPersons('B,N,F')
  34.  
  35. res = SelectPerson('F');
  36. do while res=1
  37.     call PrintPerson;
  38.     res = SelectPerson('N');
  39. end
  40.  
  41. exit;
  42.  
  43.  
  44. /*
  45.  * Print the actual person
  46.  */
  47. PrintPerson:
  48.  
  49. /* ----------------- Display Header / Kopf der Ausgabe ------------- */
  50.  
  51. head=msg.header.LANG||getName()||','||getFirstName()
  52. SAY(COPIES('=',70))
  53. SAY(head)
  54. SAY(COPIES('-',length(head)))
  55.  
  56. /* ------------------------------ Output / Ausgabe ----------------- */
  57.  
  58. /* Standard data / Standardinformationen */
  59. SAY(msg.name.LANG      ||getName()                )
  60. SAY(msg.firstname.LANG ||getFirstName()           )
  61. SAY(msg.sex.LANG       ||WORD(datasex,getSex()+1) )
  62. SAY(msg.birthdate.LANG ||getBirthDate()           )
  63. SAY(msg.birthplace.LANG||getBirthPlace()          )
  64. SAY(msg.deathdate.LANG ||getDeathDate()           )
  65. SAY(msg.deathplace.LANG||getDeathPlace()          )
  66. SAY(msg.occupation.LANG||getOccupation()          )
  67. SAY(msg.address.LANG   ||getAddress()             )
  68.  
  69. /* Memo field  /  Memofeld  */
  70. line=1
  71. SAY(msg.memo.LANG||getMemo(line))
  72. DO FOREVER
  73.    line=line+1
  74.    result=getMemo(line)
  75.    IF LENGTH(result)=0 THEN LEAVE
  76.    SAY(msg.empty.LANG||result)
  77. END
  78.  
  79. /* Marriages  /  Ehen */
  80.  
  81. p=1
  82. rc=selectFamily(p)
  83.  
  84. DO WHILE rc=1
  85.    /* Push Man on Stack  /  Menschen auf Stack */
  86.    rc=doStack('PP')
  87.  
  88.    /* Partner  /  Parner */
  89.    rc=selectPerson('p')
  90.    result=getFirstName()||' '||getName()||'  '
  91.  
  92.    /* MarriageDate  /  Heiratsdatum */
  93.    result=msg.marriage.LANG||result||getMarriageDate()
  94.  
  95.    /* Output  /  Ausgabe */
  96.    SAY('.........................................')
  97.    SAY(result)
  98.  
  99.    /* Children  /  Kinder */
  100.    c=1
  101.    rc=selectPerson(c);
  102.    DO WHILE rc=1
  103.       IF c=1 THEN
  104.          result=msg.child.LANG||getBirthDate()||' '||getFirstName()||' '||getName()
  105.       ELSE
  106.          result=msg.empty.LANG||getBirthDate()||' '||getFirstName()||' '||getName()
  107.       SAY(result)
  108.       c=c+1
  109.       rc=selectPerson(c)
  110.    END
  111.  
  112.    /* Pop Man from Stack  /  Menschen vom Stack */
  113.    rc=doStack('pP')
  114.  
  115.    /* Next Family of Actual /  Naechste Familie des Aktuellen */
  116.    p=p+1
  117.    rc=selectFamily(p)
  118. END
  119.  
  120.  
  121. /* Done / Fertig */
  122. RETURN
  123.  
  124.  
  125. /* ---------------------- LANGUAGE INIT --------------------------- */
  126. InitLanguage:
  127.  
  128.    /* Calculate Language Index */
  129.    lang='E'                              /* Default -> [E]nglish */
  130.    IF getLanguage()='Deutsch' THEN       /* Deutsch -> [G]erman */
  131.       lang='G'
  132.    IF getLanguage()='Nederlands' THEN    /* Nederlands -> [D]utch */
  133.       lang='D'
  134.    IF getLanguage()='Francais' THEN       /* Francais -> [F]rench */
  135.       lang='F'
  136.  
  137.    /* [E]nglish Messages */
  138.    msg.header.E    ='Personal data of '
  139.    msg.name.E      ='Name            : '
  140.    msg.firstname.E ='First name      : '
  141.    msg.sex.E       ='Sex             : '
  142.    msg.birthdate.E ='Birth date      : '
  143.    msg.birthplace.E='Birth location  : '
  144.    msg.deathdate.E ='Death date      : '
  145.    msg.deathplace.E='Death location  : '
  146.    msg.occupation.E='Occupation      : '
  147.    msg.address.E   ='Address         : '
  148.    msg.memo.E      ='Memo            : '
  149.    msg.picture.E   ='Picture         : '
  150.    msg.marriage.E  ='Marriage with   : '
  151.    msg.child.E     ='- Children      : '
  152.    msg.empty.E     ='                : '
  153.    msg.datasex.E   = '? male female'
  154.  
  155.    /* [G]erman Messages */
  156.    msg.header.G    ='Persoenliche Daten von '
  157.    msg.name.G      ='Name            : '
  158.    msg.firstname.G ='Vorname         : '
  159.    msg.sex.G       ='Geschlecht      : '
  160.    msg.birthdate.G ='Geburtsdatum    : '
  161.    msg.birthplace.G='Geburtsort      : '
  162.    msg.deathdate.G ='Todesdatum      : '
  163.    msg.deathplace.G='Todesort        : '
  164.    msg.occupation.G='Beruf           : '
  165.    msg.address.G   ='Addresse        : '
  166.    msg.memo.G      ='Memo            : '
  167.    msg.picture.G   ='Bild            : '
  168.    msg.marriage.G  ='Ehe mit         : '
  169.    msg.child.G     ='- Kinder        : '
  170.    msg.empty.G     ='                : '
  171.    msg.datasex.G   = '? männlich weiblich'
  172.  
  173.    /* [D]utch Messages */
  174.    msg.header.D    ='Personal data of '
  175.    msg.name.D      ='Name            : '
  176.    msg.firstname.D ='First name      : '
  177.    msg.sex.D       ='Sex             : '
  178.    msg.birthdate.D ='Birth date      : '
  179.    msg.birthplace.D='Birth location  : '
  180.    msg.deathdate.D ='Death date      : '
  181.    msg.deathplace.D='Death location  : '
  182.    msg.occupation.D='Occupation      : '
  183.    msg.address.D   ='Address         : '
  184.    msg.memo.D      ='Memo            : '
  185.    msg.picture.D   ='Picture         : '
  186.    msg.marriage.D  ='Marriage with   : '
  187.    msg.child.D     ='- Children      : '
  188.    msg.empty.D     ='                : '
  189.    msg.datasex.D   = '? male female'
  190.  
  191.    /* [F]rench Messages */
  192.    msg.header.F    ="Renseignements sur "
  193.    msg.name.F      ="Nom                : "
  194.    msg.firstname.F ="Prénom(s)          : "
  195.    msg.sex.F       ="Sexe               : "
  196.    msg.birthdate.F ="Date de Naissance  : "
  197.    msg.birthplace.F="Lieu de Naissance  : "
  198.    msg.deathdate.F ="Date du Décès      : "
  199.    msg.deathplace.F="Lieu du Décès      : "
  200.    msg.occupation.F="Activité           : "
  201.    msg.address.F   ="Adresse            : "
  202.    msg.memo.F      ="Mémo               : "
  203.    msg.picture.F   ="Image              : "
  204.    msg.marriage.F  ="Mariage avec       : "
  205.    msg.child.F     ="- Enfant(s)        : "
  206.    msg.empty.F     ="                   : "
  207.    msg.datasex.F   ="? Homme Femme"
  208.  
  209.    /* Done */
  210.    RETURN
  211.  
  212.